#define _CRT_SECURE_NO_WARNINGS 1
#include"SList.h"

void Test1()
{
	SListNode* plist = BuySListNode(1);
	SListPrint(plist);
	SListPushBack(&plist, 2);
	SListPushBack(&plist, 3);
	SListPushBack(&plist, 4);
	SListPrint(plist);
	SListPushFront(&plist, 0);
	SListPushFront(&plist, 1);
	SListPrint(plist);
	SListPopFront(&plist);
	SListPopFront(&plist);
	SListPrint(plist);
	SListPopFront(&plist);
	SListPrint(plist);
	SListEraseAfter(plist);
	SListEraseAfter(plist);
	SListPrint(plist);
	SListInsertAfter(plist, 2);
	SListPrint(plist);
	SListPopBack(&plist);
	SListPrint(plist);
	SListDestory(plist);
}

void Test2()
{
	SListNode* plist = BuySListNode(1);
	SListPushBack(&plist, 2);
	SListPushBack(&plist, 3);
	SListPushBack(&plist, 4);
	SListPrint(plist);
	SListNode* exmple = SListFind(plist,3);
	printf("%d\n", exmple->data);
}
int main()
{
	Test1();
	Test2();
	return 0;
}